package com.qen.truelicense.license.ftp;

import com.qen.truelicense.util.ObfuscatedString;

import java.text.MessageFormat;
import java.util.ResourceBundle;

/**
 * Looks up the resources for this package in a Resource Bundle.
 * Provided for comfort.
 *
 * @author licz
 * @version 1.0.0
 */
class Resources {

    private static final String CLASS_NAME = new ObfuscatedString(new long[]{0x32FE12709ABA965FL, 0x7326EEC334FF59A0L, 0x4AA7628FF33E5C8L, 0xA46E616163A17B83L, 0x19F3CC4785E27BC6L, 0x12D4DD7AEF1FE67EL, 0xC791E25BC0B354F5L}).toString();
    /* => "com.qen.truelicense.license.ftp.Resources" */

    private static final ResourceBundle resources = ResourceBundle.getBundle("ftp/Resources");

    /**
     * Looks up a string resource identified by {@code key} in
     * {@code resources}.
     */
    public static String getString(String key) {
        return resources.getString(key);
    }

    /**
     * Looks up a string resource identified by {@code key} in
     * {@code resources} and formats it as a message using
     * {@code MessageFormat.format} with the given {@code arguments}.
     */
    public static String getString(String key, Object[] arguments) {
        return MessageFormat.format(getString(key), arguments);
    }

    /**
     * Looks up a string resource identified by {@code key} in
     * {@code resources} and formats it as a message using
     * {@code MessageFormat.format} with the given singular {@code argument}.
     */
    public static String getString(String key, Object argument) {
        return MessageFormat.format(getString(key), argument);
    }

    /**
     * You cannot instantiate this class.
     */
    protected Resources() {
    }
}
